using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Overlay
{
    /// <summary>
    /// <para>Count Overlapping Features</para>
    /// <para>Generates planarized overlapping features from the input features. The count of overlapping features is written to the output features.</para>
    /// <para>从输入要素生成平面化重叠要素。重叠要素的计数将写入输出要素。</para>
    /// </summary>    
    [DisplayName("Count Overlapping Features")]
    public class CountOverlappingFeatures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CountOverlappingFeatures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature classes or layers. The input features can be point, multipoint, line, or polygon. If multiple inputs are provided, they must all be the same geometry type.</para>
        /// <para>输入要素类或图层。输入要素可以是点、多点、直线或面。如果提供了多个输入，则它们必须都是相同的几何类型。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the overlap count.</para>
        /// <para>包含重叠计数的输出要素类。</para>
        /// </param>
        public CountOverlappingFeatures(List<object> _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Count Overlapping Features";

        public override string CallName => "analysis.CountOverlappingFeatures";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZResolution", "ZTolerance", "configKeyword", "geographicTransformations", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _min_overlap_count, _out_overlap_table];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature classes or layers. The input features can be point, multipoint, line, or polygon. If multiple inputs are provided, they must all be the same geometry type.</para>
        /// <para>输入要素类或图层。输入要素可以是点、多点、直线或面。如果提供了多个输入，则它们必须都是相同的几何类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class containing the overlap count.</para>
        /// <para>包含重叠计数的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Minimum Overlap Count</para>
        /// <para>Limits the output to only locations that meet or exceed the specified number of overlaps. The default value is 1.</para>
        /// <para>将输出限制为仅满足或超过指定重叠次数的位置。默认值为 1。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Overlap Count")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _min_overlap_count { get; set; } = 1;


        /// <summary>
        /// <para>Output Overlap Table</para>
        /// <para>The output table containing records for each individual overlapping geometry.</para>
        /// <para>包含每个重叠几何的记录的输出表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Overlap Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_overlap_table { get; set; } = null;


        public CountOverlappingFeatures SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZResolution = null, object ZTolerance = null, object configKeyword = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZResolution: ZResolution, ZTolerance: ZTolerance, configKeyword: configKeyword, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}